#!/usr/bin/env bash
while true
do
#
# 北京详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w beijing | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'beijing' > log/detail_beijing.log 2>&1 &
fi
echo ${python_pid}

# 上海详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w shanghai | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'shanghai' > log/detail_shanghai.log 2>&1 &
fi
echo ${python_pid}

# 广东详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w guangdong | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'guangdong' > log/detail_guangdong.log 2>&1 &
fi
echo ${python_pid}

# 辽宁详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w liaoning | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'liaoning' > log/detail_liaoning.log 2>&1 &
fi
echo ${python_pid}

# 山东详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w shandong | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'shandong' > log/detail_shandong.log 2>&1 &
fi
echo ${python_pid}

# 山西详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w shanxicu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'shanxicu' > log/detail_shanxicu.log 2>&1 &
fi
echo ${python_pid}

# 福建详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w fujian | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'fujian' > log/detail_fujian.log 2>&1 &
fi
echo ${python_pid}

# 湖南详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w hunan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'hunan' > log/detail_hunan.log 2>&1 &
fi
echo ${python_pid}

# 湖北详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w hubei | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'hubei' > log/detail_hubei.log 2>&1 &
fi
echo ${python_pid}

# 河南详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w henan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'henan' > log/detail_henan.log 2>&1 &
fi
echo ${python_pid}

# 西藏详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w xizang | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'xizang' > log/detail_xizang.log 2>&1 &
fi
echo ${python_pid}

# 海南详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w hainan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'hainan' > log/detail_hainan.log 2>&1 &
fi
echo ${python_pid}

# 河北详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w hebei | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'hebei' > log/detail_hebei.log 2>&1 &
fi
echo ${python_pid}


# 云南详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w yunnan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'yunnan' > log/detail_yunnan.log 2>&1 &
fi
echo ${python_pid}

# 黑龙江详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w heilongjiang | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'heilongjiang' > log/detail_heilongjiang.log 2>&1 &
fi
echo ${python_pid}

# 新疆详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w xinjiang | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'xinjiang' > log/detail_xinjiang.log 2>&1 &
fi
echo ${python_pid}

# 广西详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w guangxi | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'guangxi' > log/detail_guangxi.log 2>&1 &
fi
echo ${python_pid}

# 四川详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w sichuan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'sichuan' > log/detail_sichuan.log 2>&1 &
fi
echo ${python_pid}

# 安徽详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w anhui | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'anhui' > log/detail_anhui.log 2>&1 &
fi
echo ${python_pid}

# 甘肃详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w gansu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'gansu' > log/detail_gansu.log 2>&1 &
fi
echo ${python_pid}

# 江苏详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w jiangsu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'jiangsu' > log/detail_jiangsu.log 2>&1 &
fi
echo ${python_pid}

# 陕西详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w shanxi | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'shanxi' > log/detail_shanxi.log 2>&1 &
fi
echo ${python_pid}

# 吉林详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w jilin | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'jilin' > log/detail_jilin.log 2>&1 &
fi
echo ${python_pid}

# 内蒙古详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w neimenggu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'neimenggu' > log/detail_neimenggu.log 2>&1 &
fi
echo ${python_pid}

# 天津详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w tianjin | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'tianjin' > log/detail_tianjin.log 2>&1 &
fi
echo ${python_pid}

# 青海详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w qinghai | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'qinghai' > log/detail_qinghai.log 2>&1 &
fi
echo ${python_pid}

# 浙江详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w zhejiang | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'zhejiang' > log/detail_zhejiang.log 2>&1 &
fi
echo ${python_pid}

# 贵州详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w guizhou | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'guizhou' > log/detail_guizhou.log 2>&1 &
fi
echo ${python_pid}

# 宁夏详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w ningxia | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'ningxia' > log/detail_ningxia.log 2>&1 &
fi
echo ${python_pid}

# 江西详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w jiangxi | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'jiangxi' > log/detail_jiangxi.log 2>&1 &
fi
echo ${python_pid}

# 重庆详情页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_detail.conf | grep -w chongqing | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_detail.conf' 'chongqing' > log/detail_chongqing.log 2>&1 &
fi
echo ${python_pid}

inter_time=10
sleep ${inter_time}
done